package prueba1;


public class Class1 {
    private int n;
    private String s;

    public void setN(int n) {
        this.n = n;
    }

    public int getN() {
        return n;
    }

    public void setS(String s) {
        this.s = s;
    }

    public String getS() {
        return s;
    }

    public Class1(){
        super();
    }
    public String toString(){
        return "s :"+s+"n: "+n;
        }


    @Override
    public boolean equals(Object object) {
        if (this == object) {
            return true;
        }
        if (!(object instanceof Class1)) {
            return false;
        }
        final Class1 other = (Class1) object;
        if (n != other.n) {
            return false;
        }
        if (!(s == null ? other.s == null : s.equals(other.s))) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        final int PRIME = 37;
        int result = 1;
        result = PRIME * result + n;
        result = PRIME * result + ((s == null) ? 0 : s.hashCode());
        return result;
    }
}
